package 向上向下转型;


/**
 * @author Administrator
 * @ClassName Test
 * @TIME 星期三 2020/12/23
 */
public class Test {
    public static void main(String[] args) {
        Animal an = new Dog();
        Animal an2 = new Animal();
        an.eat();
//
//        Dog dog = (Dog)an;
//        dog.eat();

        System.out.println(an2 instanceof Animal);
    }
}
